-
Notifications
You must be signed in to change notification settings - Fork 5.1k
/
common.json
154 lines (154 loc) · 4.52 KB
/
common.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
{
"swagger": "2.0",
"info": {
"title": "Communication",
"description": "Communication Services API common types.",
"version": "2021-03-07"
},
"paths": {},
"definitions": {
"CommunicationErrorResponse": {
"description": "The Communication Services error.",
"type": "object",
"required": [
"error"
],
"properties": {
"error": {
"description": "The Communication Services error.",
"$ref": "#/definitions/CommunicationError"
}
}
},
"CommunicationError": {
"description": "The Communication Services error.",
"type": "object",
"required": [
"code",
"message"
],
"properties": {
"code": {
"type": "string",
"description": "The error code."
},
"message": {
"type": "string",
"description": "The error message."
},
"target": {
"type": "string",
"readOnly": true,
"description": "The error target."
},
"details": {
"type": "array",
"items": {
"$ref": "#/definitions/CommunicationError"
},
"readOnly": true,
"description": "Further details about specific errors that led to this error."
},
"innererror": {
"x-ms-client-name": "innerError",
"readOnly": true,
"$ref": "#/definitions/CommunicationError",
"description": "The inner error if any."
}
}
},
"CommunicationCloudEnvironmentModel": {
"description": "The cloud that the identifier belongs to.",
"type": "string",
"enum": [
"public",
"dod",
"gcch"
],
"x-ms-enum": {
"name": "CommunicationCloudEnvironmentModel",
"modelAsString": true
}
},
"CommunicationIdentifierModel": {
"description": "Identifies a participant in Azure Communication services. A participant is, for example, a phone number or an Azure communication user. This model must be interpreted as a union: Apart from rawId, at most one further property may be set.",
"type": "object",
"properties": {
"rawId": {
"type": "string",
"description": "Raw Id of the identifier. Optional in requests, required in responses."
},
"communicationUser": {
"$ref": "#/definitions/CommunicationUserIdentifierModel",
"description": "The communication user."
},
"phoneNumber": {
"$ref": "#/definitions/PhoneNumberIdentifierModel",
"description": "The phone number."
},
"microsoftTeamsUser": {
"$ref": "#/definitions/MicrosoftTeamsUserIdentifierModel",
"description": "The Microsoft Teams user."
}
}
},
"CommunicationUserIdentifierModel": {
"description": "A user that got created with an Azure Communication Services resource.",
"type": "object",
"required": [
"id"
],
"properties": {
"id": {
"type": "string",
"description": "The Id of the communication user."
}
}
},
"PhoneNumberIdentifierModel": {
"description": "A phone number.",
"type": "object",
"required": [
"value"
],
"properties": {
"value": {
"type": "string",
"description": "The phone number in E.164 format."
}
}
},
"MicrosoftTeamsUserIdentifierModel": {
"description": "A Microsoft Teams user.",
"type": "object",
"required": [
"userId"
],
"properties": {
"userId": {
"type": "string",
"description": "The Id of the Microsoft Teams user. If not anonymous, this is the AAD object Id of the user."
},
"isAnonymous": {
"type": "boolean",
"description": "True if the Microsoft Teams user is anonymous. By default false if missing."
},
"cloud": {
"$ref": "#/definitions/CommunicationCloudEnvironmentModel",
"description": "The cloud that the Microsoft Teams user belongs to. By default 'public' if missing."
}
}
}
},
"securityDefinitions": {
"azure_auth": {
"type": "oauth2",
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
"flow": "implicit",
"description": "Azure Active Directory OAuth2 Flow.",
"scopes": {
"user_impersonation": "impersonate your user account"
}
}
}
}